package org.example.bridge;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @author
 * @description 客户端
 */
@SpringBootTest
public class Client {

    @Test
    void test() {
        //从关系来说多对多的关系
        //样式手机+品牌  针对品牌的
        System.out.println("=============样式手机+品牌  针对品牌的==================");
        Phone foldedPhone = new FoldedPhone(new XiaoMi());
        foldedPhone.open();
        foldedPhone.close();
        foldedPhone.call();
        System.out.println("===============================");
        Phone foldedPhone1 = new FoldedPhone(new Vivo());
        foldedPhone1.open();
        foldedPhone1.close();
        foldedPhone1.call();
        //样式手机+品牌  针对样式的
        System.out.println("=============样式手机+品牌  针对样式的==================");
        Phone upRightPhone = new UpRightPhone(new XiaoMi());
        upRightPhone.open();
        upRightPhone.close();
        upRightPhone.call();
    }
}
